import request from '@/utils/request'

// 查询住户列表
export function listHouseholder(query) {
  return request({
    url: '/system/householder/list',
    method: 'get',
    params: query
  })
}

// 查询住户详细
export function getHouseholder(holderId) {
  return request({
    url: '/system/householder/' + holderId,
    method: 'get'
  })
}

// 新增住户
export function addHouseholder(data) {
  return request({
    url: '/system/householder',
    method: 'post',
    data: data
  })
}

// 修改住户
export function updateHouseholder(data) {
  return request({
    url: '/system/householder',
    method: 'put',
    data: data
  })
}

// 删除住户
export function delHouseholder(holderId) {
  return request({
    url: '/system/householder/' + holderId,
    method: 'delete'
  })
}

// 导出住户
export function exportHouseholder(query) {
  return request({
    url: '/system/householder/export',
    method: 'get',
    params: query
  })
}